package com.pi.shisan.service.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pi.shisan.service.domain.LedDndModeSetting;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface LedDndModeSettingMapper extends BaseMapper<LedDndModeSetting> {

    @Select("select * from led_dnd_mode_setting where dnd_type = #{type} order by id asc limit 1")
    LedDndModeSetting selectOneByType(@Param("type") Integer type);

    @Delete("delete from led_dnd_mode_setting where dnd_type = #{type}")
    int clearByType(@Param("type") Integer type);
}
